import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [{
    path: '/index',
    component: () => import('../views/index.vue')
  },
    { //设置动态路由参数，用来标记不同的文章
      path: '/postDetail/:id',
      component: () => import('../views/postDetail.vue')
    },
    {
    path: '/',
    component: () => import('../views/index.vue')
  }
  ]
})

export default router